from public.action import *
from public.business import *
from public.testData import *
from public.tools import *

testCase = "DBshop016"
sideName ='网站很好看'
firefox = openBrowser(urlAdmin)
DBshopLoginAdmin(firefox)
DBshopEnterMenu3(firefox,'商品管理','管理分类','前台侧边设置')
firefox.find_element_by_xpath('//td[contains(.,"%s")]/following-sibling::td[3]/a[2]'%sideName).click()
firefox.switch_to.alert.accept()

try:
    firefox.find_element_by_xpath('//td[contains(.,"%s")]'%sideName)
    writeLog("%s 测试通过"%testCase)
except:
    writeLog("%s 测试通过"%testCase)
    getPhoto(firefox)

firefox.quit()